package com.kehutong.repair.app;

import java.util.List;

import org.coraframework.inject.Inject;
import org.coraframework.json.JSONObject;
import org.coraframework.mvc.MvcAction;
import org.coraframework.mvc.http.ReqMapping;
import org.coraframework.mvc.http.result.Result;
import org.coraframework.orm.jdbc.JdbcSession;

import com.kehutong.repair.entity.RollOutDetail;

@MvcAction
@ReqMapping("/kht-bin/roll/detail")
public class RollOutDetailAction {

    @Inject
    private JdbcSession sqlSession;

    @ReqMapping("/list")
    public Object list(JSONObject jsonObject) {
        List<RollOutDetail> list = sqlSession.findArray(RollOutDetail.class)
                .eq(jsonObject,"repairsId")
                .order("createTime", "desc")
                .exe();

        return Result.success(list);
    }
}
